import '../base/request.dart';

class LikeRequest extends BaseRequest {
  String _uid; // 视频uid
  bool _isCancel; // 是否取消点赞

  LikeRequest(String id, {bool isCancel = false}) {
    _uid = id;
    _isCancel = isCancel;
    this
      ..setHeader('fa', 'course-flag')
      ..setHeader('ZmEtMjAyMS0wNC0xMiAyMToyMjoyMC1mYQ==fa', 'auth-token');
  }

  @override
  bool get isHttps => true;

  @override
  SupportMethods get method =>
      _isCancel ? SupportMethods.DELETE : SupportMethods.POST;

  @override
  bool get needLogin => true;

  @override
  String get path => "like/$_uid";

  @override
  String get route => "uapi/fa";
}
